<template>
  <div>
    详情{{$route.params.id}}
    <br>
    详情{{id}}
  </div>
</template>

<script lang="ts">
    import { Component, Prop, Vue, Watch} from 'vue-property-decorator';
    @Component
    export default class HelloWorld extends Vue {
        id: number = 0;
        created() {
            this.id = ~~this.$route.params.id
        }
        @Watch('$route')
        routeChange(to: any, from: any) {
            this.id = ~~this.$route.params.id
        }
    }
</script>

<style scoped lang="less">

</style>
